<%--
  Created by IntelliJ IDEA.
  User: bb
  Date: 2021/10/20
  Time: 16:34
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link href="jquery-easyui-1.7.0/themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <link href="jquery-easyui-1.7.0/themes/icon.css" rel="stylesheet" type="text/css" />
    <link href="jquery-easyui-1.7.0/demo/demo.css" rel="stylesheet" type="text/css" />
    <script src="jquery-easyui-1.7.0/jquery.min.js" type="text/javascript"></script>
    <script src="jquery-easyui-1.7.0/jquery.easyui.min.js" type="text/javascript"></script>
    <script src="jquery-easyui-1.7.0/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
</head>
<body>
    <div id="toolbar_OrderDetail" style="padding: 2px 5px;">
        客户名称：&nbsp;<input class="easyui-textbox" id="userName_Detail" name="userName_Detail"
                          readonly="readonly" value="${requestScope.orderInfo.user.userName}" style="width: 115px;"/>&nbsp;&nbsp;
        订单金额：&nbsp;<input class="easyui-textbox" id="orderPrice_Detail" name="orderPrice_Detail"
                          readonly="readonly" value="${requestScope.orderInfo.orderprice}" style="width: 115px"/>&nbsp;&nbsp;
        <br>
        订单日期：&nbsp;<input class="easyui-datebox" id="orderDate_Detail" name="orderDate_Detail"
                          readonly="readonly" value="${requestScope.orderInfo.ordertime}" style="width: 115px"/>&nbsp;&nbsp;
        订单状态：&nbsp;<input class="easyui-textbox" id="orderStatus_Detail" name="orderStatus_Detail"
                          readonly="readonly" value="${requestScope.orderInfo.status}" style="width: 115px"/>
    </div><%--toolbar_OrderDetail--%>
    <div id="datagrid_Detail" class="easyui-dataagrid"></div><%--datagrid--%>

    <script>
        $(function (){
            $('#datagrid_Detail').datagrid({
                url:'order/getOrderDetail?oid=' + ${requestScope.orderInfo.id},
                rownumbers:true,
                fit:true,
                header:'#toolbar_OrderDetail',
                columns:[[{
                    title:'商品名称',
                    field:'pid',
                    width:280,
                    formatter:function (value, row, index){
                        if (row.pi){
                            return row.pi.name
                        }
                        return value
                    }
                },{
                    title: '单价',
                    field: 'price'
                },{
                    title: '数量',
                    field: 'num'
                },{
                    title: '小计',
                    field: 'totalprice'
                }]]
            })
        })
    </script><%--datagrid_Detail--%>
</body>
</html>
